#@LayuiLayout()
#define content()
<div style="padding:15px">
	<form class="layui-form layui-form-pane">
	  <div class="layui-form-item">
	    <label class="layui-form-label">原密码：</label>
	    <div class="layui-input-block">
	      <input class="layui-input" name="olderpassword" type="password">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">新密码：</label>
	    <div class="layui-input-block">
	      <input class="layui-input" name="newpassword" type="password">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">确认密码：</label>
	    <div class="layui-input-block">
	      <input class="layui-input" name="repassword" type="password">
	    </div>
	  </div>
	  <div class="layui-form-item">
	      <button class="layui-btn" lay-submit lay-filter="save">保存</button>
	  </div>
	</form>
</div>
#end
#define jsFunction()
<script>
	layui.use(['layer', 'form'], function () {
  	var $ = layui.jquery;
  	var layer = layui.layer;
  	var form = layui.form;
    form.on('submit(save)', function(data){
    	$.ajax({
    		type:"POST",
    		url:"doEditPassword",
    		dataType:"json",
    		data:data.field,
    		async:false,
    		success:function(msg){
    			if(msg.result=="success"){
    				parent.layer.msg(msg.message);
    				parent.layer.closeAll("iframe");
    			}else {
    				layer.msg(msg.message);
    			}
    		}
    	})
    	return false;
   	});
	});
</script>
#end